home *** CD-ROM | disk | FTP | other *** search
- /* Mod-Player V2.00 [10-Juni-1996] for Directory Opus 5.
- By Leo Davidson ("Nudel", P0T-NOoDLE/Gods'Gift Utilities)
-
- Revision by Helmut Hummel("Delta Soft") EMail: hhummel@t-online.de
-
- Änderung - Dateien als Liste an DeliTracker übergeben !!!
-
- English
- Some better: The DeliTracker begins not to play his program,
- he starts with the 1st selected module and the
- script is running in async mode.
-
- The Delitracker will find his configuration file.
-
- The modules will all deselected.
- to install-help read the lines around the stars (*)
- But it's always "Nudel's" program.
-
- Deutsch
- Verbesserungen: Die Titel werden sofort mit dem DeliTracker abgespielt,
- nicht erst nach Laden des Moduleprogramms.
-
- Der DeliTracker findet sein Configurations-File.
-
- Die Titel werden alle sofort deselektiert.
- Allerdings bleibt es "Nudel's" Programm.
- -----------------------------------------------------------------------------
-
- Call as:
- ARexx DOpus5:ARexx/DeliPlay.dopus5 {Qp} {f}
-
- ------------------------------------------------------------------------------
- RUN asynchron. (!!!)
- Create a config for DeliTracker in DOpus5:Settings with hide mode and other
- settings you wish (Demo-Config in archive included, copy to DOpus:Settings)
- *****************************************************************************
-
- - Path to DeliTracker command (edit the follow line[s] to your settings) */
-
- Delipath = "dh2:systemtools/moduleplayer/delitracker_II"
-
- /****************************************************************************/
-
- DeliTracker = "run Delitracker2 CONFIG DOPUS5:Settings/DeliTracker.config CX_POPUP NO "
-
- /* Start-Command (don't remove the space at end !!! - used to append delilist)
-
- Note for english: If only one mod is selected, no requester appears.
- In this case use DeliStop.rexx to stop the DeliTracker
- *--------------------------------------------------------------------------*/
-
- options results
- options failat 99
- signal on ioerr
-
- Quit_After = "NO"
-
- parse arg DOpusPort FilePath
-
- DOpusPort = Strip(Strip(DOpusPort,"B"," "),"B",'"')
- FilePath = Strip(Strip(FilePath,"B",' '),"B", '"')
- If DOpusPort = "" then
- Do
- Say "Not correctly called from Directory Opus 5!"
- Say "Load this ARexx script into editor for more info."
- EXIT
- END
-
- /* If only one mod selected, just play that mod, else load all mods
- into the DeliTracker-List and begin to play. */
-
-
- Address VALUE DOpusPort
-
- lister query source
- Lister_Handle = result
- lister query Lister_Handle path
- Lister_Path = strip(result, "B", '"')
- lister query Lister_Handle selfiles
- Dateien = result
- lister query Lister_Handle numselentries
- Lister_NumSelEnt = result
-
- if Lister_NumSelEnt <= 0 then do /* doubleclick or only 1 mod */
- If ~Show("P", "DELITRACKER") Then /* Delitracker is not running*/
- call OpenDeli(FilePath)
- else do
- Address DELITRACKER /* Delitracker is running */
- PlayMod FilePath
- end
- EXIT
- end
- position = 1
- call Open('programm', 't:deliplay.temp', 'w')
- if result = 0 then call ioerr
- call writeln('programm', 'MODLIST')
- call writeln('programm', FilePath)
-
- if Lister_NumSelEnt > 0 then do
- call MakeList
-
- writech('programm', Lister_Path)
- call substr(Dateien, position)
- call strip(result, 'B', '"')
- datei = result
- writeln('programm', datei)
- lister select Lister_Handle '"'datei'"' off
- lister refresh Lister_Handle
- end
- Close('programm')
- If ~Show("P", "DELITRACKER") Then
- call OpenDeli("T:deliplay.temp")
- else do
- Address DELITRACKER
- PlayMod 'T:deliplay.temp'
- end
- Address DELITRACKER
- 'status m max'
- count = result
- do forever
- 'status m fmt'
- format=result
- 'status m fil'
- Temp_Name = result
- 'status m nam'
- Int_Name = result
- 'status m num'
- counter = result
- address VALUE DOpusPort
- select
- when counter = 1 then do
- dopus request '"Spiele Modul ' counter ' von ' count ':'||X2C(0A)||'Dos-Name : 'Temp_Name||X2C(0A)||' Interner Name :' Int_Name||X2C(0A)' Format: 'format' " Nächstes|Laufen lassen|Stop'
- erg = rc
- if erg ~=0 then erg = erg + 2
- end
- when counter = count then do
- dopus request '"Spiele Modul ' counter ' von ' count ':'||X2C(0A)||'Dos-Name : 'Temp_Name||X2C(0A)||' Interner Name :' Int_Name||X2C(0A)' Format: 'format' " Voriges|Laufen lassen|Stop'
- erg = rc
- erg = erg * 2
- end
- otherwise
- dopus request '"Spiele Modul ' counter ' von ' count ':'||X2C(0A)||'Dos-Name : 'Temp_Name||X2C(0A)||' Interner Name :' Int_Name||X2C(0A)' Format: 'format' " Voriges|Nächstes|Laufen lassen|Stop'
- erg = rc
- if erg ~= 0 then erg = erg + 1
- end
- address DELITRACKER
- if erg = 0 then 'quit'
- if erg = 2 then 'prevsong'
- if erg = 3 then 'nextsong'
- if erg = 4 then leave
- end
- Address Command
- 'delete T:deliplay.temp all quiet force'
- EXIT
-
- /*=========================== Sub-routines =========================*/
-
- MakeList:
- do j=1 to Lister_NumSelEnt - 1
- writech('programm', Lister_Path)
- call index(Dateien, '" "', position)
- position2 = result
- call substr(Dateien, position, position2 - position)
- call strip(result, "B", '"')
- datei = result
- writeln('programm', datei)
- lister select Lister_Handle '"'datei'"' off
- lister refresh Lister_Handle
- position = position2 + 3
- end
- return
- /*--------------------------------------------------------------------*/
- WARNING:
- dopus request '"Du mußt einen SOURCE-Lister haben oder einen Pfad übergeben!" OK'
- address DELITRACKER quit
- EXIT
- /*--------------------------------------------------------------------*/
- OpenDeli:
- PARSE ARG STARTMOD
- pragma('D', DeliPath)
- address command DeliTracker||"module "||'"'STARTMOD'"'
- Quit_After = "YES"
- TickTick = Time(M)
- Do While ~Show("P","DELITRACKER")
- IF Time(M) - TickTick > 0 Then Do
- dopus request '"Fehler beim Laden des DeliTracker!'||X2C(0A)||'Prüfe bitte den Pfad im ARexx script." OK'
- EXIT
- END
- END
- RETURN
- /*====================================================================*/
-